package com.medlinker.android.activity;

import com.medlinker.android.R;
import com.medlinker.android.adapters.ViewPagerAdapter;
import com.medlinker.android.viewpagerindicator.TitlePageIndicator;


import android.app.ActivityGroup;
import android.os.Bundle;
import android.support.v4.view.ViewPager;

public class ViewPagerActivity extends ActivityGroup {

    
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        ViewPager pager = (ViewPager) findViewById(R.id.viewpager);
        if(pager != null){
            ViewPagerAdapter adapter = new ViewPagerAdapter( this );
            TitlePageIndicator indicator =
                    (TitlePageIndicator)findViewById( R.id.indicator );
            pager.setAdapter(adapter);
            indicator.setViewPager(pager);
        }else{
            //on est sur tablette
            //donc gestion avec les fragments
//            ListViewExtensionFragment viewer = (ListViewExtensionFragment) getSupportFragmentManager().findFragmentById(R.id.liste_extension_fragment);
//            viewer.setListExtension(this);

        }
    }
}
